#ifndef MATCHPROCPARAMCOLLECTREQUESTMODEL_H
#define MATCHPROCPARAMCOLLECTREQUESTMODEL_H

#include "JsonSerializable.h"

namespace MesModel{

class MatchProcParamCollectRequestParamList;
class MatchProcParamCollectRequestParamInfo;

class MatchProcParamCollectRequestModel : public JsonSerializable
{
public:
    MatchProcParamCollectRequestModel()=default;
    MatchProcParamCollectRequestModel(QString factoryNo,QString transId,QDateTime eventTime,QString eventUser,QString machineNo,QList<MatchProcParamCollectRequestParamInfo> paramInfo);
    void fromJson(const QJsonObject &json)override;
    QJsonObject toJson() const override;

public:
    QString factoryNo;
    QString transId;
    QDateTime eventTime;
    QString eventUser;
    QString machineNo;
    QString workStep = "NA";
    QString location = "NA";
    QList<MatchProcParamCollectRequestParamInfo> paramInfo;
};

class MatchProcParamCollectRequestParamInfo: public JsonSerializable
{
public:
    QString pcu;
    QList<MatchProcParamCollectRequestParamList> paramList;

    MatchProcParamCollectRequestParamInfo()=default;
    MatchProcParamCollectRequestParamInfo(QString pcu,QList<MatchProcParamCollectRequestParamList> paramList);
    void fromJson(const QJsonObject &json)override;
    QJsonObject toJson() const override;

};

using ParamKey =
struct ParamListKeys
{
   const QString XRay_IlluminationVoltage               = "XRay_IlluminationVoltage";               //光照电压
   const QString XRay_NeedleGaugeCalibrationDiameter    = "XRay_NeedleGaugeCalibrationDiameter";    //针规校准直径
   const QString XRay_CellQrCode                        = "XRay_CellQrCode";                        //电芯二维码
   const QString XRay_DetectionStartTime                = "XRay_DetectionStartTime";                //检测开始时间
   const QString XRay_DetectionCompletionTime           = "XRay_DetectionCompletionTime";           //检测完成时间
   const QString XRay_Corner01_NegativeCoveringPositive = "XRay_Corner01_NegativeCoveringPositive"; //1#角负极包正极
   const QString XRay_Corner02_NegativeCoveringPositive = "XRay_Corner02_NegativeCoveringPositive"; //2#角负极包正极
   const QString XRay_Corner03_NegativeCoveringPositive = "XRay_Corner03_NegativeCoveringPositive"; //3#角负极包正极
   const QString XRay_Corner04_NegativeCoveringPositive = "XRay_Corner04_NegativeCoveringPositive"; //4#角负极包正极

};

class MatchProcParamCollectRequestParamList: public JsonSerializable
{
public:
    QString paramKey;
    QString paramValue;
    QString seq = "NA";
    QString location = "NA";


    MatchProcParamCollectRequestParamList()=default;
    MatchProcParamCollectRequestParamList(QString k,QString v,QString seq,QString location);
    void fromJson(const QJsonObject &json)override;
    QJsonObject toJson() const override;
};

}

#endif // MATCHPROCPARAMCOLLECTREQUESTMODEL_H
